# syntax=docker/dockerfile:1
FROM golang:1.21 AS go21
WORKDIR /src
COPY . .
RUN go build -o /bin/server ./server/server.go && go build -o /bin/client ./client/client.go

FROM debian:stable-slim
COPY --from=go21 /bin/server /bin/server
COPY --from=go21 /bin/client /bin/client
COPY ./startup.sh /bin
RUN chmod +x /bin/startup.sh

ENTRYPOINT ["/bin/startup.sh"]

